<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent {
            width: 400px;
            height: 400px;
            padding: 50px;
            margin: 100px;
            background-color: #f20;
        }
        
        .child {
            width: 200px;
            height: 200px;
            padding: 50px;
            pointer-events: none;
            background-color: #ff0;
        }
        
        .child-child {
            width: 50px;
            height: 50px;
            padding: 50px;
            pointer-events: none;
            background-color: #00d;
        }
    </style>
</head>

<body>
    <script>
        window.onload = function() {
            let parent = document.getElementById("parent")
            console.log(parent);

            parent.addEventListener("click", function(event) {
                console.info(event.offsetX);
            });
        }
    </script>
    <div class="parent" id="parent">
        <div class="child">
            <div class="child-child"></div>
        </div>
    </div>
</body>

</html>